From: Derek Buitenhuis Date: Wed, 10 Aug 2022 22:17:58 +0000 (+0100) Subject: ipfsgateway: Remove default gateway X-Git-Tag: archive/raspbian/7%8.1-3+rpi1~1^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/success//%22mailto:kde%40ewsoftware.de/%22/%22http:/www.example.com/cgi/success/%22mailto:kde%40ewsoftware.de/%22?a=commitdiff_plain;h=4b3c6f1c27eb450e76cae64f83742122191d85fa;p=ffmpeg.git ipfsgateway: Remove default gateway A gateway can see everything, and we should not be shipping a hardcoded default from a third party company; it's a security risk. Signed-off-by: Derek Buitenhuis (cherry picked from commit 412922cc6fa790897ef6bb2be5d6f9a5f030754d) Gbp-Pq: Name 0007-ipfsgateway-Remove-default-gateway.patch --- diff --git a/libavformat/ipfsgateway.c b/libavformat/ipfsgateway.c index 5a5178c5..907b61b0 100644 --- a/libavformat/ipfsgateway.c +++ b/libavformat/ipfsgateway.c @@ -240,13 +240,8 @@ static int translate_ipfs_to_http(URLContext *h, const char *uri, int flags, AVD ret = populate_ipfs_gateway(h); if (ret < 1) { - // We fallback on dweb.link (managed by Protocol Labs). - snprintf(c->gateway_buffer, sizeof(c->gateway_buffer), "https://dweb.link"); - - av_log(h, AV_LOG_WARNING, - "IPFS does not appear to be running. " - "You’re now using the public gateway at dweb.link.\n"); - av_log(h, AV_LOG_INFO, + av_log(h, AV_LOG_ERROR, + "IPFS does not appear to be running.\n\n" "Installing IPFS locally is recommended to " "improve performance and reliability, " "and not share all your activity with a single IPFS gateway.\n" @@ -259,6 +254,8 @@ static int translate_ipfs_to_http(URLContext *h, const char *uri, int flags, AVD "3. Define an $IPFS_PATH environment variable " "and point it to the IPFS data path " "- this is typically ~/.ipfs\n"); + ret = AVERROR(EINVAL); + goto err; } }